<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return['basic']=$return['pluginset'];
if($_RQ['op']=='main'){
	cfc('core')->checklogin();
	$tomid=intval($_RQ['tomid']);
	$tcpid=intval($_RQ['tcpid']);
	if(!$tcpid && !$tomid){
		$tomid=pdo_getcolumn('core_members',array('uniacid'=>$_SESSION['uniacid']),'id');
	}
	$return['backurl']=custom_url('jy_ailiao/tcplog//tomid='.$tomid,true);
	$item=$this->model('kefu')->gettcp($tcpid,$tomid);
	if(!$item['id']){
		exi('当前对话不存在','error',$return['backurl']);
	}
	$member=model('core/member')->detail($_SESSION['uid']);
	$member['nickname']=$member['nickname']?:$member['username'];
	$return['member']=$member;
	$tomember=model('core/member')->detail($tomid);
	$tomember['nickname']=$tomember['nickname']?:$tomember['username'];
	$return['tomember']=$tomember;
	$return['item']=$item;
	$return['uid']=$_SESSION['uid'];
	$callMediaType=2;
	$callStatus='calling';
	$bigScreenUserId=$_SESSION['uid'];
	$callRole='caller';
	include $this->template('index3');
	//exi($return);
}